n_obs = 0;
for country_iter=1:size(country_indices_non_NaN)
    country_name=country_indicator_names_mapping{data_array_for_regression_stacked_by_variable(1,country_indices_non_NaN(country_iter),pos.country_ident)};
    stacked_data=squeeze(cat(3,dependent_variable_for_run(:,country_iter),data_array_for_regression_for_run(:,country_iter,:)));
    first_obs_index=find(~any(isnan(stacked_data),2),1,'first');
    last_obs_index=find(~any(isnan(stacked_data),2),1,'last');
    NaN_obs=sum(any(isnan(stacked_data(first_obs_index:last_obs_index,:)),2));
    first_obs=data_array_for_regression_stacked_by_variable(time_indices_non_NaN(first_obs_index),pos.timeline);
    last_obs=data_array_for_regression_stacked_by_variable(time_indices_non_NaN(last_obs_index),pos.timeline);
    n_obs = n_obs + (last_obs_index-first_obs_index+1-NaN_obs);
    % fprintf('%-30s \t %u \n', country_name, last_obs_index-first_obs_index+1-NaN_obs)
end

n_countries = size(country_indices_non_NaN,1);
